<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Database extends Model
{
    use HasFactory;

    public $guarded = [];

    static function default($userId) {
        return self::where('user_id', $userId)->where('default', 1)->first();
    }
}
